Thread Dump

A JVM Thread Dump is a snapshot taken at a given time, which provides you with a complete listing of all created Java Threads. Each Java thread found provides information, such as Thread name; often used by middleware vendors to identify the Thread Id along with its associated Thread Pool name and state (running, stuck etc.).

Benefits

  • To see how many threads are there as per configuration.
  • Analyze the behavior of the threads.
  • To identify if any thread is stuck (is in waiting/blocked state) etc.

 

To open the Thread dump window, go to Actions > Thread Dump.

Figure 3: Thread Dump

The Thread dump window is displayed. You can filter the thread dump details based on the Tier, Server, and Instances.

Figure 4: Thread Dump Window

Operations on Thread Dump

There are the following operations you can perform on Thread dump:

  • View Thread dump
  • Take Thread dump
  • Analyze Thread dump
  • Schedule Thread dump

View Thread Dump

This window displays a section from where you can view the thread dump summary and full thread dump.

 

Thread Dump Summary

This window provides details, such as tier name, server name, and instance name for which the thread dump was taken along with the time when it was taken. It also provides the file name along with its path where the thread dump is stored. Apart from this, it also displays the user name and user notes (if any). You can navigate to the pages using the pagination provided and can also download the report (in word/excel/pdf format) using the download icons available.

Figure 5: Thread Dump Summary

It has the following fields:

  • Tier: It shows the tier name which was selected while taking the TCP dump.
  • Server: It shows the server name (corresponding to the tier) selected at the time of taking TCP dump.
  • Instance: Instance is a process or specific running copy of a software application or service on a server. It is a unique copy of the software that is running independently and may have different configurations.
  • Time: It shows the time when the TCP dump is taken.
  • File: It shows the TCP dump file.
  • User: It shows the name of the user who is operating.
  • Agent: It shows the type of agent which is being used for taking the thread dump. Such as: Java Agent.
  • User Note: In this option, the user can add some notes to the thread dump if they require.
  • Actions: In this option, the user can perform the following two actions: download and delete. A user can delete a particular thread dump by selecting the thread dump and clicking on the Delete   A user can download a particular thread dump by selecting the thread dump and clicking on the Download  icon.

Full Thread Dump

This window also displays a section at the bottom where you can view the full thread dump.

Figure 6: View Thread

Take Thread Dump

You need to follow the below mentioned steps for taking a thread dump:

  1. On the Thread Dump window, click on the Take Thread Dump The Take Thread Dump window will appear.
Figure 7: Take Thread Dump

2. Select tier name and server name from drop down menu.

Figure 8: Select Tier Name and Server Name

3. To capture all instances, click the All   button, and for ND instances, click the ND Available instance information is displayed according to selected tier name and server name. This instance information displays – Process ID, instance name, process arguments along with log path.

Figure 9: Take Thread Dump Window

4. Select the process ID for which the thread dump is to be taken, specify the count and time interval, and click the Take Thread Dump The path where thread dump is taken is displayed in a pop-up box and thread dump details are added to the list.

Common Methods

This displays a bar graph representing a list of common methods along with their count. On clicking a bar, you can view the method details at the right.

Common Methods

This displays a bar graph representing a list of common methods along with their count. On clicking a bar, you can view the method details at the right.

Analyze Thread Dump

You can analyze a thread dump based on the selection of the thread dump file from the Thread dump table. This section is categorized into various tabs where you can get further details related to threads, such as:

  • Thread State
  • Thread Category
  • Common Method
  • Most Used Methods
  • Thread Group
  • Deadlock
  • Hotstacks

The illustration of each is provided in the subsequent sections:

Thread State

It displays a pie chart that contains the percentage of runnable, waiting, and timed waiting threads. On the right, thread details (thread name, priority, state, ID) are displayed. On clicking a thread name, its corresponding stack trace is displayed.

Figure 11: Thread State

Thread Category

It displays a pie chart that contains the percentage of daemon and non-daemon threads. On the right, thread details (thread name, priority, state, ID) are displayed. On clicking a thread name, its corresponding stack trace is displayed.

Figure 12: Thread Category

Common Methods

This displays a bar graph representing a list of common methods along with their count. On clicking a bar, you can view the method details at the right.

Figure 13: Common Methods

Most Used Methods

This displays a bar graph representing a list of the most used common methods along with their count. On clicking a bar, you can view the thread details within that method along with a stack trace of the selected thread.

Figure 14: Most Used Methods

Thread Group

This displays a pie chart representing all the thread groups. On clicking a group, you can view associated threads of that group at the right. On clicking a thread name, you can view the stack trace of that thread.

Figure 15: Thread Group

Deadlock

This displays details of the methods that created the deadlock along with the thread details.

Figure 16: Deadlock

Hotstacks

This displays a bar graph representing the hotstacks along with its count. On the right, the detailed description of the hotstack is displayed.

Figure 17: Hotstacks

Schedule Thread Dump

You can schedule a thread dump by selecting a process ID, specifying the start and end time, and clicking the Schedule Thread Dump button.

Figure 18: Schedule Thread Dump Button

The scheduled thread dump is displayed in the Scheduled Thread Dump section. You can reschedule or cancel from the Action section.

Figure 19: Schedule Thread Dump

The thread dump is executed at the scheduled date and time. Once the execution is done, the status is changed to Completed.

Figure 20: Schedule Thread Dump Completed

View Compared Summary

To view the compared summary of two or more thread dumps, select the corresponding checkboxes and click the Compared Summary button.

Figure 21: Compared Summary Button

This displays the compared summary of the selected thread dumps that includes the following sections:

Figure 22: Compared Summary

Total Threads

Figure 23: Total Threads

Hotstacks

Figure 24: Hotstacks

Thread Statistics

Figure 25: Thread Statistics

Analyze Multi Thread Dump (s)

You can analyze multi thread dumps in the same ways you analyze single thread dump. You just need to select two or more thread dumps from the list and click the Analyze Multi Thread Dump button.

Figure 26: Analyze Multi Thread Dump Button

Other Operations

Apart from the theme, you can also perform the following operations:

  • Remove the selected thread dumps by selecting the rows first and clicking the button.
  • View Thread Dump Message by clicking the button.
  • Download the Thread Dump file at local, by selecting the row and clicking the button.
  • Remove the Thread Dump from the list by clicking the button. 
  • View all thread dumps by clicking the icon. 
  • Download the thread dump report in Word, Excel, and PDF formats .